package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;

import com.ruoyi.system.mapper.api.WRecordTransferOutMapper;
import com.ruoyi.system.domain.api.WRecordTransferOut;
import com.ruoyi.system.service.IWRecordTransferOutService;

/**
 * 链上提现Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-22
 */
@DataSource(DataSourceType.SLAVE)
@Service
public class WRecordTransferOutServiceImpl implements IWRecordTransferOutService 
{
    @Autowired
    private WRecordTransferOutMapper wRecordTransferOutMapper;

    /**
     * 查询链上提现
     * 
     * @param id 链上提现主键
     * @return 链上提现
     */
    @Override
    public WRecordTransferOut selectWRecordTransferOutById(Long id)
    {
        return wRecordTransferOutMapper.selectWRecordTransferOutById(id);
    }

    /**
     * 查询链上提现列表
     * 
     * @param wRecordTransferOut 链上提现
     * @return 链上提现
     */
    @Override
    public List<WRecordTransferOut> selectWRecordTransferOutList(WRecordTransferOut wRecordTransferOut)
    {
        return wRecordTransferOutMapper.selectWRecordTransferOutList(wRecordTransferOut);
    }

    /**
     * 新增链上提现
     * 
     * @param wRecordTransferOut 链上提现
     * @return 结果
     */
    @Override
    public int insertWRecordTransferOut(WRecordTransferOut wRecordTransferOut)
    {
        wRecordTransferOut.setCreateTime(DateUtils.getNowDate());
        return wRecordTransferOutMapper.insertWRecordTransferOut(wRecordTransferOut);
    }

    /**
     * 修改链上提现
     * 
     * @param wRecordTransferOut 链上提现
     * @return 结果
     */
    @Override
    public int updateWRecordTransferOut(WRecordTransferOut wRecordTransferOut)
    {
        return wRecordTransferOutMapper.updateWRecordTransferOut(wRecordTransferOut);
    }

    /**
     * 批量删除链上提现
     * 
     * @param ids 需要删除的链上提现主键
     * @return 结果
     */
    @Override
    public int deleteWRecordTransferOutByIds(Long[] ids)
    {
        return wRecordTransferOutMapper.deleteWRecordTransferOutByIds(ids);
    }

    /**
     * 删除链上提现信息
     * 
     * @param id 链上提现主键
     * @return 结果
     */
    @Override
    public int deleteWRecordTransferOutById(Long id)
    {
        return wRecordTransferOutMapper.deleteWRecordTransferOutById(id);
    }
}
